package com.itheima.mapper;

import com.itheima.pojo.Setmeal;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author :WuJunJie
 * packageName :com.itheima.mapper
 * fileName :SetMealMapper
 * creationTime :2022-11-24 20:17
 */
@Mapper
public interface SetmealMapper {
    Integer insertSetMeal(@Param("setmeal") Setmeal setmeal);

    List<Setmeal> selectPage(@Param("name") String name, @Param("start") Integer start, @Param("pageSize") Integer pageSize);

    Integer countTotal(@Param("name") String name);

    Integer updateSetmeal(@Param("setmeal") Setmeal setmeal);

    Setmeal selectById(@Param("id") String id);

    Integer deleteByids(@Param("ids") List<String> ids);

    Integer updateStatus(@Param("status") Integer status,@Param("ids") List<String> ids,
                         @Param("updateTime") LocalDateTime updateTime, @Param("updateUser") String updateUser);

    List<Setmeal> selectSetmeals(@Param("categoryId") String categoryId, @Param("status") Integer status);

    Integer selectStatusById(@Param("id") String id);

    List<Integer> selectStatusByIds(@Param("ids") List<String> ids);
}
